package com.itheima.tlias84.controller;


import com.itheima.tlias84.utils.ResultUtil;
import jakarta.servlet.http.HttpSession;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("cookie")
public class TestCookieController {

    @GetMapping("save")
    public ResultUtil saveCookie(HttpSession session){

        session.setAttribute("username","国家");
        session.setAttribute("password","1234");
        return ResultUtil.success();
    }

}
